home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / amac33.arc / FILE19.QM < prev    next >
Text File  |  1991-04-28  |  39KB  |  891 lines

  1. *                                  (FILE19).QM
  2. *┌───────────────────────── (INDEX) FileManager Macros ────────────────────────┐
  3. *│
  4. *│@(f)  Execute programs requiring filename without full path name <-NEW
  5. *│
  6. *│@(z)  LOAD all files in "Ring"
  7. *│@(1)  LOAD file from sorted list
  8. *│@(4)  LOAD file from "PickList", wild cards OK
  9. *│@(5)  LOAD file whose name is at the cursor
  10. *│@(6)  re-LOAD current file from disk copy
  11. *│@(3)  DELETE file from sorted list
  12. *│@(9)  EDIT file from "RingList"
  13. *│@(0)  EDIT file from "RingList" if new files have been loaded
  14. *│@(2)  READ macfile & LOAD it's txtfile from sorted list
  15. *│@(8)  READ macfile of txtfile that is loaded
  16. *│@(f7) READ macfile & LOAD it's txtfile from txtfile list
  17. *│@(f8) READ macfile from macfile list, txtfile is not loaded
  18. *│
  19. *│@(f1) SAVE file with name "Mos_Day_Hour_Min.Ext"
  20. *│@(f2) SAVE file with name "CurrentFileName.Mos_Day"
  21. *│@(f3) SAVE Read-Only files
  22. *│@(f4) EXECUTE Dos command from List
  23. *│@(f5) EXECUTE Dos command from List/ with CurrentFileName
  24. *│@(f6) Turn "DIR" list into a "8.3" list of filenames (T.Farley)
  25. *│
  26. *│@(h)  Select Index item with cursor line, then <enter>.
  27. *│@(q)- QUIT all files in "Ring"
  28. *│
  29. *│(Index) - How to locate macro or item below from Index using @h
  30. *│(Description)
  31. *│(Startup)
  32. *│(Macros)
  33. *│(Other) Macros
  34. *│(Version) history
  35. *└────────[ be sure to leave at least one blank line at end of Index  ]────────┘
  36.  
  37.  
  38.  
  39. * (Index) Use;
  40. *
  41. * To locate a macro or item in this file, press @h, place the cursor
  42. * line on the desired item in the Index above, and press <enter>.
  43. * See BOOK15.QM for more details.
  44.  
  45.  
  46.  
  47. * (Description):
  48.  
  49. * (FILE19).QM QEdit macros allow the user to select files from a list
  50. * to: either load a file, read a macfile, delete a file, read a macfile
  51. * of loaded txtfile, save a read-only file, or save files with
  52. * date-time name.
  53.  
  54. * File sorting is done using DX Directory Extender, v2.11. If the newer
  55. * version 2.60 is used and it is NOT registered, the DX heading will
  56. * show in the file selection window of @1 to @5 and the initial cursor
  57. * line will not be positioned on the first files in the selection list.
  58. * The file selection can be still be made by moving the cursor line to
  59. * the desired file and pressing <enter>. Alternatively, you can either
  60. * register DX or change the macros. I suggest registration. DX is the
  61. * most powerful DOS file and directory manager available.
  62.  
  63. * For (other) macros, see ALLMACRO.INF
  64.  
  65. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  66.  
  67. * (Startup): See also FILE.DOC for requirements.
  68. *
  69. * To BEGIN, just type "START FILE" <Enter>. All pertinent files will be
  70. * loaded in the "Ring" for viewing, and FILE19.MAC is read.
  71. * Alternatively, type "START FILE 0" <Enter> and the disk copies of all
  72. * files in the "Ring" will be loaded ready for editing, saving time.
  73.  
  74.  
  75.  
  76. *(Macros):-------------------
  77. *
  78. * ┌────────────────────────────────────────────────────────┐
  79. * │@(z) Load all files in "Ring"                           │
  80. * └────────────────────────────────────────────────────────┘
  81. *
  82. * This macro is handy if you want to quickly load all files in the
  83. * ring. QEdit has the advantage that the EditFile, just like the QEdit
  84. * command line, can accept multiple file names together, separated by
  85. * spaces. Wild card file specification is also possible. The end result
  86. * is that files can be entered in QEdit's "ring" *without* actually
  87. * loading.  Qedit defers loading files in the ring until you either
  88. * EditFile or nextfiles into the file. This macro simply automatically
  89. * "loads" all files in the "Ring" by NextFiling through all files. If
  90. * your hard drive is slow (like mine), you'll appreciate the time
  91. * this macro saves. Run this macro twice to see the difference.
  92.  
  93. * If a file is set "read-only", press <Esc>, and run the macro until
  94. * all files are loaded. The technique using the NUL file as a place
  95. * marker was written by Kyle Watkins of SemWare and is used here with a
  96. * slight modification.
  97. *
  98. * See also QLSTxx.QM for using this macro to load files from a
  99. * FileList.
  100. *
  101. @z      Macrobegin
  102.         Editfile '!' Return      * Insert -or- GoTo NUL File
  103.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  104.         LOOP:                    * Main test loop
  105.             Nextfile             * Move to next files in Ring
  106.             Cursorleft           * Move cursor left (need for NUL test)
  107.             Jfalse LOOP:         * If couldn't move to left, it's not
  108.                                  * the NUL File AND cursor position
  109.                                  * has not changed -- LOOP again
  110.                                  *ELSE
  111.                                  * Check to see if in the NUL File
  112.             Cursorleft           * Move cursor left for NUL Test
  113.             Jfalse END:          * If couldn't move left -- We
  114.                                  * ARE in the NUL File and Need
  115.                                  * to END the Macro
  116.                                  *ELSE
  117.             Cursorright          * Move back to Col. 2 in NUL File
  118.         END:                     * Macro is DONE
  119.             Quit                 * Quit the NUL File
  120. *
  121. * 21 bytes Tue  10-30-1990  20:05:53
  122.  
  123.  
  124.  
  125. *┌──────────────────────────────────────────────────────────────────┐
  126. *│@(1) Selects file to LOAD from sorted list of files in directory  │
  127. *└──────────────────────────────────────────────────────────────────┘
  128. *
  129. @1 macrobegin
  130.         altwordset                      * For all file names
  131.         editfile "file.srt" return      * Load sort list
  132.         pause                           * Select sort type
  133.         copy                            * Copy line to scrap
  134.         quit                            * Quit file.srt
  135.         DOS "file-DX "                  * Make/sort file list
  136.         paste return return             *
  137.         editfile "c:!" return           * Load sorted file list
  138.         cursordown insertline           *
  139.         cursordown                      * Get to first file name line
  140.         pause                           * Pause to select file
  141.         begline wordright               * Put cursor on file name
  142.         markword copy                   * Mark/copy file name
  143.         killfile quit                   * Kill/quit c:!
  144.         editfile paste return           * Load file
  145.         defaultwordset                  * Reset default
  146. *
  147. * 68 bytes Sun  09-09-1990  14:38:25
  148.  
  149.  
  150.  
  151. *┌─────────────────────────────────────────────────────────────────────┐
  152. *│@(2) LOAD txtfile/READ macfile from sorted list of files in directory│
  153. *└─────────────────────────────────────────────────────────────────────┘
  154. *
  155. @2 macrobegin
  156.         altwordset                      * For all file names
  157.         DOS "file-DX mac d-"            * Sort macfiles by date
  158.         return return                   *
  159.         editfile "c:!" return           * Load sorted file list
  160.         cursordown insertline           *
  161.         cursordown                      * Get to first file name line
  162.         pause                           * Pause to select
  163.         begline                         * Re-position cursor if moved
  164.         find "." return return          * Select it and get to dot
  165.         cursorright delrtword cursorleft* Delete extension
  166.         markword copy                   * Mark/copy file name - no ext
  167.         killfile quit                   * Kill/quit c:!
  168.         editfile paste  "qm" return     * Load txtfile
  169.         defaultwordset                  * Reset default
  170.         macroread paste "mac" return    * Read macfile
  171. *
  172. * 78 bytes Sun  09-09-1990  14:38:29
  173.  
  174.  
  175.  
  176. *┌──────────────────────────────────────────────────────────────────┐
  177. *│@(3) Selects file to DELETE from sorted list of files in directory│
  178. *└──────────────────────────────────────────────────────────────────┘
  179. *
  180. * Be careful to select ONLY the file you want deleted.
  181. *
  182. @3 macrobegin
  183.         altwordset                      * For all file names
  184.         editfile "file.srt" return      * Load sort list
  185.         pause                           * Pause to select sort
  186.         markline copy paste             * Paste selected line
  187.         begline markword                * Mark file ext
  188.         quit                            * Quit file.srt
  189.         DOS "file-DX "                  * Make/sort file list
  190.         paste return return             *
  191.         editfile "c:!" return           * Load sorted file list
  192.         cursordown insertline           *
  193.         cursordown                      * Get to first file name line
  194.         pause                           * Pause to select file
  195.         begline wordright               * Put cursor on file name
  196.         markword copy                   * Select it
  197.         insertline                      * Insert line in c:!
  198.         paste                           * Paste file name
  199.         copy                            * Copy file name to scrap
  200.         DOS "del " paste return return  * Delete select file
  201.         killfile quit                   * Kill/quit c:!
  202.         defaultwordset                  * Reset default
  203. *
  204. * 84 bytes Sun  09-09-1990  14:38:34
  205.  
  206.  
  207.  
  208.  
  209. *┌─────────────────────────────┐
  210. *│@(4) Load Files From PickList│
  211. *└─────────────────────────────┘
  212. *
  213. * To run, just press Alt and 4 at the same time. At the prompt "File=",
  214. * enter a [file name(s)] and [file sort option] to make a PickList
  215. * using the following syntax:
  216. *
  217. *         [file name(s)]  [file sort option]  <enter>
  218. *
  219. * where [file sort option] is either "esda".
  220. *
  221. * For example, when entering:
  222. *
  223. *         c*.* s- (space must be included between name/sort option!)
  224. *
  225. * a file to load can be selected from a PickList of all files in
  226. * the current directory beginning with the letter "c" sorted by size,
  227. * largest first. Entering file name(s) WITHOUT a sort option, makes
  228. * a PickList sorted by name an then extension.
  229. *
  230. * This macro can sort files in any order. The following information is
  231. * from the file DX.DOC for Directory Extender. Please read this
  232. * document for more information on using the excellent program DX.
  233. *
  234. * Sorting is by name by default. The /SOrt switch without a value sorts
  235. * by name  and then extension in ascending  order. The sorting
  236. * criteria consists of: "N" for name, "E" for extension, "S" for  size,
  237. * "D" for date/time, "A" for attribute. Specifying  a letter by itself
  238. * or with a '+' suffix indicates ascending  order;  specifying a '-'
  239. * suffix indicates descending order.
  240. *
  241. * Examples of the sort options are:
  242. *
  243. *     [filename(s)] ne         => sort by name and extension
  244. *
  245. *     [filename(s)] e-n-       => sort files descending by
  246. *                                 extension first and then by
  247. *                                 descending name
  248. *
  249. *     [filename(s)] snd-       => sort files by ascending size,
  250. *                                 ascending name, and then
  251. *                                 descending date
  252. *
  253. @4 macrobegin
  254.         unmarkblock altwordset          * For all file names
  255.         begline insertline              * Insert temp line
  256.        "File="                          *
  257.         endline markcolumn              * Start mark
  258.         pause                           * File name?, wild cards OK
  259.         markcolumn copy                 * Mark/copy file name to scrap
  260.         delline                         * Delete temp line
  261.         DOS "PICK " paste               * Make PickList
  262.         return return                   *
  263.         editfile "c:!" return           * Load list
  264.         cursordown insertline           *
  265.         cursordown                      * Get to first file name line
  266.         pause                           * Pause to select file
  267.         begline wordright               * Put cursor on file name
  268.         markword copy                   * Mark/copy selection to scrap
  269.         killfile quit                   * Kill/quit c:!
  270.         editfile paste return           * Load file selected
  271.         defaultwordset                  * Reset default
  272. *
  273. * 60 bytes Sun  09-09-1990  14:38:38
  274.  
  275.  
  276.  
  277.  
  278.  
  279. * ┌──────────────────────────────────────────────┐
  280. * │@(5)  LOADS a file whose name is at the cursor│
  281. * └──────────────────────────────────────────────┘
  282. * This picks up a file name that is sitting at the cursor position in the
  283. * editor, and loads it into another buffer (From SemWare BBS).
  284. *
  285. @5      macrobegin                      *
  286.         altwordset                      * For all file names
  287.         markword                        * Mark file name
  288.         copy                            * Copy to scrap
  289.         editfile                        * Load it
  290.         paste return                    *
  291.         defaultwordset                  *
  292. *
  293. * 11 bytes Sun  09-09-1990  14:38:43
  294.  
  295.  
  296.  
  297.  
  298. * ┌───────────────────────────────────────┐
  299. * │@(6) Reloads current file from disk    │
  300. * └───────────────────────────────────────┘
  301. *
  302. @6 MacroBegin
  303.    SplitLine EditFile CurrentFilename Return NewFile "N" Return
  304. *
  305. * 12 bytes Fri  08-10-1990  15:24:13
  306.  
  307.  
  308.  
  309.  
  310.  
  311. *┌─────────────────────────────────────────────┐
  312. *│@(8) Reads macfile of txtfile that is loaded │
  313. *└─────────────────────────────────────────────┘
  314. *
  315. * From MACR27.QM
  316. *
  317. @8 macrobegin
  318.    macroread currentfilename backspace backspace "mac" return
  319. *
  320. * 15 bytes Sun  09-09-1990  14:38:55
  321.  
  322.  
  323.  
  324.  
  325. * ┌────────────────────────────────────────────────────────────────────┐
  326. * │@(9) Make RingList, Load all files in ring, select file to edit     │
  327. * └────────────────────────────────────────────────────────────────────┘
  328. *
  329. * Does not make NEW RingList if already made.
  330.  
  331. * Both @9 and @0 have the disadvantage that each files in the ring is
  332. * loaded and modified while getting each FileName to scratch to make
  333. * the RingList. All files in the ring can be QUIT using @q macro.
  334. *
  335. @9      Macrobegin
  336.         prevfile unmarkblock    * Move to prevfile so file being
  337.                                 * edited is first files in RingList
  338.         editfile "!" return     * Load/Edit RingList file !
  339.         endline begline         * If ! is already made, it has text
  340.         jtrue GETFILE:          * then GoTo GETFILE
  341.                                 *ELSE
  342.         dropanchor              *
  343.         storescrbuff "1" return * Clear scratch buffer
  344.         Begline Cursorright     * Put cursor in Col. 2 for StopFile
  345.  LOOP:                          * Main test loop
  346.         Nextfile                * Move to next files in Ring
  347.         splitline dropanchor    *
  348.         currentfilename         *
  349.         appendscrbuff "1" return* Append filename to scratch buffer
  350.         cut                     * Delete block
  351.         Cursorleft              * Move cursor left
  352.                                 * (need for StopFile test)
  353.         Jfalse DOIT:            * If couldn't move to left, cursor
  354.                                 * must be in Col. 1 and it's not
  355.                                 * the StopFile -- GO with DOIT
  356.                                 *ELSE
  357.                                 * Check to see if in the StopFile File
  358.         Cursorleft              * Move cursor left for StopFile Test
  359.         Jfalse RINGLIST:        * If couldn't move left again -- We
  360.                                 * ARE in the StopFile File and Need
  361.                                 * to GO to RINGLIST
  362.                                 *ELSE
  363.         Cursorright             * Restore Cursor to its previous
  364.                                 * position and GO with the DOIT
  365.  DOIT:                          * DOIT Loop
  366.         Jump LOOP:              * Return to the Main Loop
  367.  RINGLIST:                      * Get RingList into file
  368.         editfile "!" return     * Load RingList file
  369.         getscrbuff "1" return   * Put RingList in it
  370.         delline unmarkblock     * Delete top line and unmark file
  371.  GETFILE:                       *
  372.         pause copy              * Pause and select file to edit
  373.         editfile paste return   * and then begin editing it
  374. *
  375. * 58 bytes Mon  10-01-1990  10:56:15
  376.  
  377.  
  378.  
  379.  
  380. * ┌────────────────────────────────────────────────────────────────────┐
  381. * │@(0) Make RingList, Load all files in ring, select file to edit     │
  382. * └────────────────────────────────────────────────────────────────────┘
  383. *
  384. * Makes NEW RingList even if already made.
  385.  
  386. * Both @9 and @0 have the disadvantage that each files in the ring is
  387. * loaded and modified while getting each FileName to scratch to make
  388. * the RingList. All files in the ring can be QUIT using @q macro.
  389. *
  390. @0      Macrobegin
  391.         prevfile unmarkblock    * Move to prevfile so file being
  392.         dropanchor              * edited is first files in RingList
  393.         storescrbuff "1" return * Clear scratch buffer
  394.         Begline Cursorright     * Put cursor in Col. 2 for StopFile
  395.  LOOP:                          * Main test loop
  396.         Nextfile                * Move to next files in Ring
  397.         splitline dropanchor    *
  398.         currentfilename         *
  399.         appendscrbuff "1" return* Append filename to scratch buffer
  400.         cut                     * Delete block
  401.         Cursorleft              * Move cursor left
  402.                                 * (need for StopFile test)
  403.         Jfalse DOIT:            * If couldn't move to left, cursor
  404.                                 * must be in Col. 1 and it's not
  405.                                 * the StopFile -- GO with DOIT
  406.                                 *ELSE
  407.                                 * Check to see if in the StopFile File
  408.         Cursorleft              * Move cursor left for StopFile Test
  409.         Jfalse RINGLIST:        * If couldn't move left again -- We
  410.                                 * ARE in the StopFile File and Need
  411.                                 * to GO to RINGLIST
  412.                                 *ELSE
  413.         Cursorright             * Restore Cursor to its previous
  414.                                 * position and GO with the DOIT
  415.  DOIT:                          * DOIT Loop
  416.         Jump LOOP:              * Return to the Main Loop
  417.  RINGLIST:                      * Get RingList into file
  418.         editfile "!" return     * Load RingList file
  419.         getscrbuff "1" return   * Put RingList in it
  420.         delline unmarkblock     * Delete top line and unmark file
  421.  GETFILE:                       *
  422.         pause copy              * Pause and select file to edit
  423.         Quit                    * Quit the RingList File
  424.         editfile paste return   * and then begin editing it
  425. *
  426. * 50 bytes Mon  10-01-1990  11:02:09
  427.  
  428.  
  429.  
  430.  
  431.  
  432. *  ┌─────────────────────────────────────────────────┐
  433. *  │@(f1) Saves file with name "Mos_Day_Hour_Min.Ext"│
  434. *  └─────────────────────────────────────────────────┘
  435. *
  436. * This macro saves the current file with the name as
  437. * "Mos_Day_Hour_Min.Ext".  For example, @f1 saves this file as
  438. * 08191025.QM when date and time are Sun 08-19-1990  10:25:00.
  439. *
  440. * Insert must be ON.
  441. *
  442. * Thanks to Jim Wright for the neat idea how to condense date and time
  443. * with his macro in QE-MEM.ZIP. Like many other macro ideas from
  444. * others, they often seem so simple once we see and understand them
  445. * that we say "why didn't I think of that" - but I didn't !
  446.  
  447. @f1    macrobegin
  448.  *************************************** TOGGLE INSERT ON*************
  449.        insertline                      * Insert test line
  450.        "a" cursorleft "a"              * Insert "aa"
  451.        endline                         * If not at endline-insert is on
  452.  Jtrue FIN:                            * If at endline   -insert is off
  453.        toggleinsert                    * Toggle ON if off
  454.  FIN:                                  *
  455.        delline                         * Delete test line
  456.  *************************************** CONDENSE DATE & TIME *******
  457.        unmarkblock                     * Begin no marked block
  458.        insertline begline              * Insert line
  459.        insertdate inserttime           * Get date & time to condense
  460.        delltword  delltword            * Delete seconds
  461.        backspace                       * Delete :
  462.        cursorleft cursorleft           * Keep minutes
  463.        backspace                       * Delete :
  464.        cursorleft cursorleft           * Keep hour
  465.        delltword  delltword            * Delete spaces and year
  466.        backspace                       * Delete -
  467.        cursorleft cursorleft           * Keep day
  468.        backspace                       * Delete -
  469.        cursorleft cursorleft           * Keep month
  470.        delltword  delltword            * Delete spaces & day name
  471.        endline                         * Go to end of condensed number
  472.        currentfilename                 * Get currentfilename
  473.        find "." return "b" return      * Move to begin of extension
  474.        cursorleft markcolumn           * Move off dot and mark it
  475.        find ":" return "b" return      * Move to :
  476.        cursorleft deleteblock          * Del all but .ext of file name
  477.        cut                             * Get number.ext to scrap
  478.        writeblock paste return         * Save number.ext
  479. *
  480. * 63 bytes Sat  09-15-1990  09:58:56
  481.  
  482.  
  483.  
  484.  
  485. * ┌────────────────────────────────────────────────────────┐
  486. * │@(f2) Saves file with name "CurrentFileName.Mos_Day"    │
  487. * └────────────────────────────────────────────────────────┘
  488. *
  489. * This macro saves the current file with the name "CurrentFileName.Mos_Day".
  490. * For example, ^@f2 saves it as FILE19.819 when date and time are
  491. * Sun  08-19-1990  10:25:00. Use this macro Jan-Sept.
  492. *
  493. @f2   macrobegin
  494.       unmarkblock                     * Begin no marked block
  495.       insertline begline              * Insert line
  496.       insertdate                      * Get date & time to condense
  497.       delltword  delltword            * Delete spaces and year
  498.       backspace                       * Delete -
  499.       cursorleft cursorleft           * Keep day
  500.       backspace                       * Delete -
  501.       cursorleft                      * Keep last digit of month,
  502.       backspace                       * Delete first digit of month
  503.       backspace                       * Delete -
  504.       delltword  delltword            * Delete spaces & day name
  505.       begline                         *
  506.       currentfilename                 * Get currentfilename
  507.       delltword                       * Delete extension
  508.       cut                             * Get file name.num to scrap
  509.       writeblock paste return         * Save file name.num
  510. *
  511. * 26 bytes Wed  10-03-1990  19:24:02
  512.  
  513.  
  514.  
  515.  
  516. * * This macro saves the current file with the name "CurrentFileName.Mos_Day".
  517. * * For example, ^@f2 saves it as FILE19.119 when date and time are
  518. * * Sun  10-19-1990  10:25:00. Use this macro Oct-Dec.
  519. * *
  520. * @f2   macrobegin
  521. *       unmarkblock                     * Begin no marked block
  522. *       insertline begline              * Insert line
  523. *       insertdate                      * Get date & time to condense
  524. *       delltword  delltword            * Delete spaces and year
  525. *       backspace                       * Delete -
  526. *       cursorleft cursorleft           * Keep day
  527. *       backspace                       * Delete -
  528. *       backspace                       * Delete last digit of month
  529. *       cursorleft                      * Keep first digit of month,
  530. *       delltword  delltword            * Delete spaces & day name
  531. *       begline                         *
  532. *       currentfilename                 * Get currentfilename
  533. *       delltword                       * Delete extension
  534. *       cut                             * Get file name.num to scrap
  535. *       writeblock paste return         * Save file name.num
  536. * *
  537. * * 25 bytes Fri  10-19-1990  12:53:19
  538.  
  539.  
  540.  
  541.  
  542. * ┌──────────────────────────────────────────────┐
  543. * │@(F3) Saves Read-Only files                   │
  544. * └──────────────────────────────────────────────┘
  545. *
  546. * This macro will save the currently loaded file if the file attribute
  547. * on the disk copy is set to Read-Only. QEdit currently will not save
  548. * files loaded as Read-Only.
  549. *
  550. * This macro is written to use either Dos ATTRIB, Gavin's ALTER, or
  551. * Norton's FA. To change from using Dos ATTRIB change the respective
  552. * lines in the macro and reconvert with QMAC.
  553. *
  554. * One word of caution: any file on the disk in the current directory
  555. * with same prefix as the loaded file will have it's read attribute
  556. * reset to read OFF regardless of the extension. Gavin's ALTER is the
  557. * fastest way to reset attributes but it also resets ALL the attributes,
  558. * including the archive bit, of ALL files in the directory with the same
  559. * prefix.
  560. *
  561. * To save a file loaded as Read-Only just press @f3:
  562.  
  563. @f3     macrobegin
  564.         unmarkblock                     * Unmark blocks
  565.         insertline                      * Insert blank line on top
  566.         markcolumn                      *
  567.         currentfilename markcolumn      * Get currentfilename on line
  568.         storescrbuff "1" return         * Store currentfilname to buf/1
  569.         find "." return  "B" return     * Find dot back
  570.   jtrue IFEXT:                          * If dot found go to IFEXT:
  571.         endline ".*"                    * Add ".*" if name has NO ext
  572.   jump FULLEXT:                         * Go to FULLEXT
  573.   IFEXT:                                * If name has extension then..
  574.         cursorright deltoeol "*"        * Add "*" after dot
  575.   FULLEXT:                              *
  576.         copy                            * Copy "prefix.*" to scrap
  577.         delline                         * Delline
  578.         changefilename "$" return       * Change currentfilename to $
  579.      dos "ATTRIB -R "                   * Clear Read Only attribute...
  580.         paste return return             *    w/ Dos    ATTRIB
  581. *    dos "ALTER "                       *
  582. *       paste "/RE" return return       *    w/ Gavin  ALTER (fastest)
  583. *    dos "FA "                          *
  584. *       paste "/R-" return return       *    w/ Norton FA
  585.         insertline                      * Insert blank line in $
  586.         unmarkblock                     * Unmark all blocks
  587.         getscrbuff "1" return           * Get origfilename on line
  588.         copy                            * Copy to scrap
  589.         delline                         * Delline
  590.         changefilename paste return     * Change $ to origfilename
  591.         return                          * Gives OK to overlay origfile
  592.         savefile                        * Save origfile
  593. *
  594. * 80 bytes Sat  09-15-1990  09:16:14
  595. * 78 bytes Tue  01-29-1991  19:26:21 changed "B " to "B"
  596.  
  597.  
  598.  
  599.  
  600. *┌──────────────────────────────────────┐
  601. *│ @(f4) Execute Dos Commands From List │
  602. *└──────────────────────────────────────┘
  603. * To run, just press @f4 and move cursor line to the desired command
  604. * to execute. Then press <enter> to execute command and return to file
  605. * you editing. Modify DOS.LIST as you need.
  606. *
  607. * Run Syntax: [command]  <enter>
  608.  
  609. @f4  Macrobegin
  610.         unmarkblock                     *
  611.         editfile "DOS.LST" return       * Load command list
  612.         pause                           * Select command
  613.         copy                            * Get command to scrap
  614.         quit                            * Quit command list
  615.         DOS paste return return         * Execute Dos command
  616. *
  617. * 28 bytes Sat  09-15-1990  08:56:57
  618.  
  619.  
  620.  
  621. *┌──────────────────────────────────────────────────────────┐
  622. *│ @(f5) Execute Dos Commands From List With CurrentFileName│
  623. *└──────────────────────────────────────────────────────────┘
  624. *
  625. * To run, just press @f5 and move cursor line to the desired command
  626. * to execute. Then press <enter> to execute command. Press <enter> again
  627. * to return to file you were editing. Dos executes the command as if it
  628. * were run at the command line followed by the currentfilename, then
  629. * <enter>. Modify the DOS.LIST as you need.
  630.  
  631. * I recall getting this macro from the SemWare BBS but do not recall
  632. * the author. If anyone knows, please let me know so I can give proper
  633. * credit. It's quite a useful and simple macro.
  634. *
  635. * Run Syntax: [command] CurrentFileName <enter>
  636. *
  637. @f5 Macrobegin
  638.         unmarkblock                     *
  639.         editfile "DOS.LST" return       * Load command list
  640.         pause                           * Select command
  641.         copy                            * Get command to scrap
  642.         quit                            * Quit command list
  643.         DOS paste " " currentfilename   * Execute command w/
  644.                                         * currentfilename
  645.         return                          * To return to QEdit
  646. *
  647. * 30 bytes Sat  09-15-1990  09:24:37
  648.  
  649.  
  650.  
  651. * Macro  @(f6)  does a DIR and ends up with a list of
  652. * filenames in conventional "8.3" format:
  653. *
  654. * *
  655. * * DIRLIST:  turn a DOS "DIR" command into a list of filenames.
  656. * *
  657. * * By:   Tim Farley        (For Ken Housley on RelayNet).
  658. * * Date: October 22, 1990
  659. * *
  660. @f6     MacroBegin
  661.         Dos "DIR " Pause EndLine ">$$$.TMP" Return Return
  662.         HorizontalWindow EditFile "$$$.TMP" Return
  663.         DelLine
  664.         DelLine                   * DELETE THIS LINE IF DOSVER < 4.0
  665.                                   * | This line is needed for Dos 3.3 TH
  666.         DelLine DelLine DelLine   * Delete header info
  667.         DELLINE                   * | Added FOR DOSVER 3.3, TH
  668.         EndFile DelLine           * Delete totals line
  669.         JFalse abort:             * Failed?  NO FILES!
  670.         BegFile                   * Back to top line, please.
  671.         GotoColumn "13" Return    * Just past filename
  672.       loopeol:
  673.         DelToEol                  * delete size/date/etc.
  674.         CursorDown                * go to next file.
  675.         JTrue loopeol:            * repeat until no more
  676.         BegFile                   * Back to top.
  677.         GotoColumn "9" Return     * Column where "." goes.
  678.       loopdot:
  679.         "." CursorLeft            * add a "." to each name
  680.         CursorDown                * try to go to next
  681.         JTrue loopdot:            * repeat until no more
  682.         BegFile
  683.         FindReplace " " Return    * replace all spaces with
  684.         DelLine Return            * NOTHING!
  685.         "NG" Return               * No prompting, just do it.
  686.       abort:
  687.        KILLFILE                   * | Added to kill temp file
  688.        ESCAPE ESCAPE              * | Added to eliminate
  689.                                   * |"changes made" message, TH
  690. *
  691. * 96 bytes Mon  10-22-1990  22:25:14  (added TH)
  692. * 100 bytes Sun  10-28-1990  11:58:10 (added TH)
  693.  
  694. * The above macro would require QEdit 2.1 and QMAC 2.1 for use.  If
  695. * you want to put it in your QCONFIG.DAT, remove all the comments
  696. * and reformat it so it fits all on one line.
  697. *
  698. * Thanks for the detailed comments about WordRight/WordLeft.
  699. *
  700. * --Tim Farley
  701. *   SemWare Technical Support
  702.  
  703.  
  704.  
  705.  
  706. * ┌─────────────────────────────────────────────────────────┐
  707. * │@(f7) READ macfile & LOAD it's txtfile from txtfile list │
  708. * └─────────────────────────────────────────────────────────┘
  709. *
  710. * @f7 enables a file to be selected for editing and it's macfile read
  711. * from a prepared list of txtfiles. The list of txtfiles (-qm.lst)
  712. * included with FILE19 is a list of the latest macros in this series,
  713. * but it can be altered to meet your needs by adding [drive:]\[path\]
  714. * both in front of each files in the list and also in the second line of
  715. * the macro, and adding or deleting any files you choose to/from this
  716. * list. The modified macro can be put in your QCONFIG.DAT file and
  717. * macros can be loaded and read while in any directory. To run, press
  718. * @f7, cursor down to the desired file, and press <enter>. Remember,
  719. * txtfiles must have the extension "QM" and the macfiles must have the
  720. * extension "MAC".
  721. *
  722. @f7 macrobegin
  723.     editfile "-qm.lst" return           * Edit txtfile list
  724.     pause                               * Pause to select macro to read
  725.     endline                             * Go to end of file name
  726.     backspace backspace                 * and remove it's extension
  727.     copy quit                           * Copy file name to scrap
  728.     editfile  paste "qm"  return        * Load selected macro txtfile
  729.     macroread paste "mac" return        * and read it's macfile
  730. *
  731. * 42 bytes Thu  10-18-1990  12:23:41
  732.  
  733.  
  734.  
  735. *┌───────────────────────────────────────────────────────────┐
  736. *│ @(f8) READ macfile from macfile list, txtfile not loaded  │
  737. *└───────────────────────────────────────────────────────────┘
  738. *
  739. * @f8 enables a macfile to be selected and read from a prepared list
  740. * of macfiles. The list of macfiles (-mac.lst) included with FILE19 is
  741. * a list of the latest macros in this series, but it can be altered to
  742. * meet your needs by adding [drive:]\[path\] in front of each files in
  743. * the list and also in the second line of the macro, and adding or
  744. * deleting any files you choose to/from this list. The modified macro
  745. * can be put in your QCONFIG.DAT file and macros can be read while in
  746. * any directory. To run, press @f8, cursor down to the desired file,
  747. * and press <enter>. Remember, macfiles must have the extension "MAC".
  748. *
  749. @f8 macrobegin
  750.     editfile "-mac.lst" return          * Edit macfile list
  751.     pause                               * Pause to select macro to read
  752.     endline                             * Go to end of macfile name
  753.     backspace backspace backspace       * and remove it's extension
  754.     copy quit                           * Copy macro name to scrap
  755.     macroread paste "mac" return        * Read it's macfile only
  756. *
  757. * 38 bytes Thu  10-18-1990  12:23:50
  758.  
  759.  
  760.  
  761.  
  762. *┌───────────────────────────────────────────────────────────────────┐
  763. *│@(h) Finds first word on cursor line marked in document below      │
  764. *└───────────────────────────────────────────────────────────────────┘
  765. *
  766. *        @h macro has 2 steps:
  767. *
  768. *        1. Press @ and h at the same time. An ! shows at the
  769. *        end of the top line. Cursor down to desired line in Index.
  770. *
  771. *        2. Press Enter. The macro first erases the !, and
  772. *        then finds the first word on the cursor line in the document
  773. *        below marked with (...).
  774. *
  775. * See BOOK15.QM for more details.
  776. *
  777. @h macrobegin
  778.         unmarkblock                     * Unmark any marked blocks
  779.         begfile endline                 * Go to file begin endline
  780.         "!"                             * Put ! at endline
  781.         begline
  782.         find "!" return return begline  * Highlight !
  783.         pause                           * Pause for Index selection
  784.         wordright markword              * Mark first word on line
  785.         copy                            * Copy word to scrap buffer
  786.         begfile                         * Begfile
  787.         find "!" return return delch    * Find & delete !
  788.         endpara                         * Go to end of Index
  789.         makectrofscreen                 * Cursor line center of window
  790.         find "(" paste ")"
  791.         return "I" return               * Find first marked word in doc
  792.  jfalse NOMARK:
  793.         begline                         * If mark found go to begline
  794.  jump END:
  795.  NOMARK:
  796.         begfile                         * If no mark found go to begfile
  797.  END:
  798. *
  799. * 47 bytes Fri  09-14-1990  14:06:26
  800.  
  801.  
  802.  
  803. *┌──────────────────────────────────┐
  804. *│@(q) QUITs all Files in Ring      │
  805. *└──────────────────────────────────┘
  806. *
  807. @q      macrobegin
  808.     LOOP:
  809.         quit
  810.         jump LOOP:
  811. *
  812. * 8 bytes Sat  09-29-1990  00:03:46
  813.  
  814.  
  815.  
  816. *┌────────────────────────────────────────────────────────────────┐
  817. *│@(f) Executes programs requiring filename without full pathname │
  818. *└────────────────────────────────────────────────────────────────┘
  819. *
  820. @f  MacroBegin
  821.     Unmarkblock Insertline          * Insert temp line
  822.     Currentfilename                 * with currentfilename
  823.     MarkCharacter                   * Begin mark
  824.     Find "\" Return "B" Return      * Find \ backwards
  825.     CursorRight Cut                 * Cut filename to scrap
  826.     Delline                         * Delete temp line
  827.     Dos "dir " Paste Return         * Execute "dir"
  828.                                    ** Change "dir " to "program " name
  829. *
  830. * 29 bytes Wed  01-23-1991  20:59:24
  831.  
  832.  
  833.  
  834.  
  835. * (Version) History:
  836. *
  837. *  1.0 - Initial version named SORT10.ZIP
  838. *  1.1 - changed and shortened Alt-f3 to keep extraneous files
  839. *        from ring
  840. *      - Changed file names from SORTxx.xxx to FILExx.xxx.
  841. *  1.2 - DX Directory Extended not included to save download time.
  842. *  1.2a- Changed other file names in series, this is an update.
  843. *  1.3 - Added @4 to load files from PickList, wild cards OK.
  844. *      - Changed j:$ to c:! in macros and batch file.
  845. *      - Changed .QL and .LST files.
  846. *      - Changed key assignments from alternate_functions
  847. *        to alternate_numbers.
  848. *      - All macros shortened.
  849. *  1.4 - FILE-DX.BAT was not sa:ving "echo .." initialization; corrected.
  850. *      - Modified macros @1-4 so Insert does NOT have to be ON.
  851. *      - Added AltWordSet to @1-4 to get all files.
  852. *      - Removed need to use scratch buffers in @3.
  853. *      - Added @5 to LOAD a file whose name is at the cursor.
  854. *      - Added @6 to execute Dos Commands From List.
  855. *      - Added @7 to EXECUTE DOS commands from List
  856. *        with CurrentFileName.
  857. *      - Added @8 to read macfile of txtfile that is loaded.
  858. *      - Added ^3 to save Read-Only files.
  859. *      - Added ^1 and ^2 to save files with date-time name.
  860. *      - Modified @1-4 and batch files to exclude directories in file
  861. *        list and PickList.
  862. *      - Removed check to quit c:! if already loaded in @1-4.
  863. *      - Changed @4 to use only PICK.BAT.
  864. *  1.5 - Added @9 to select file to edit from RingList
  865. *      - Added @0 to select file to edit from RingList if new files have
  866. *        been loaded since making last RingList
  867. *      - Added @h to FIND items or macros in Index.
  868. *      - Added @q to QUIT all files in ring.
  869. *  1.6 - Added @6 to re-LOAD current file from disk copy.
  870. *      - Modified @9 and @0 to be faster and shorter.
  871. *      - Modified @f2 for correct extension Oct-Dec.
  872. *      - Changed @f1 thru @f5 key assignments.
  873. *  1.7 - Added @f6 to turn "DIR" command into a "8.3" list of filenames,
  874. *        written by  T. Farley of SemWare.
  875. *      - Added @f7 and @f8 to read and load txtfiles and macfiles from
  876. *        a prepared list of active txtfiles and macfiles.
  877. *      - Modified @f2 for Oct-Dec and added alternate version
  878. *        for Jan-Sept.
  879. *      - DOS.LST was inadvertantly left out of versions since 1.4.
  880. *        It is now included.
  881. *  1.8 - Modified @f6 for DOS Ver 3.3, other Dos versions not tested.
  882. *      - Modified documentation and added START.BAT.
  883. *      - Added @z to load all files in "Ring" buffer.
  884. *      - Modified @f2 for Jan-Sep and added alternate version
  885. *        for Oct-Dec.
  886. *  1.9 - Added @f to execute programs requiring filename without full path name.
  887. *      - Corrected @h Index Use instructions.
  888. *      - Shortened @f3 2 bytes.
  889.  
  890. * Tom Hogshead  Tue  01-29-1991
  891.